import { MockMethod } from 'vite-plugin-mock';
import { resultPageSuccess, resultSuccess } from '../_util';

const resultList = [
  {
    id: 6,
    "address": import.meta.env.VITE_PUBLIC_PATH + '/src/assets/pdf/file/Signed_Organize.pdf',
    "field": "[]",
    "companyName": "医院名称",
    "contractName": "合同名称",
    "state": 0 //0有效，1无效
  }
];

export default [
  {
    url: '/basic-api/updateContractTemplate',
    timeout: 200,
    method: 'put',
    response: ({ body }) => {
      return resultSuccess(body);
    },
  },
  {
    url: '/basic-api/addContractTemplate',
    timeout: 200,
    method: 'post',
    response: ({ body }) => {
      return resultSuccess({ id: 7, ...body });
    },
  },
  {
    url: '/basic-api/findContractTemplate',
    timeout: 200,
    method: 'post',
    response: ({ query }) => {
      return resultSuccess(resultList);
    },
  },
] as MockMethod[];
